package com.example.diancai.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.diancai.entity.DcUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.diancai.entity.WxUser;
import com.example.diancai.mapper.DcUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author q
 * @since 2025-03-07
 */
@Service
public class DcUserService extends ServiceImpl<DcUserMapper, DcUser> {
@Autowired
private DcUserMapper dcUserMapper;
    public DcUser getByuId(String openid) {
        return lambdaQuery()
                .eq(DcUser::getuId, openid)
                .last("limit 1")
                .one();
    }

}
